package com.dev.dream.exochatlockscreen;

import android.content.Intent;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.Preference.OnPreferenceClickListener;

public class SettingsReceiveMsgActivity extends PreferenceActivity implements
		OnPreferenceChangeListener {

	Preference changeBackground, preview, avatar;

	// CustomCheckBoxPreference enable_random_bg;

	

	@Override
	public void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		addPreferencesFromResource(R.xml.pre_receive_msg_exo);

		changeBackground = (Preference) findPreference("ChangeBackground");
		changeBackground
				.setOnPreferenceClickListener(new OnPreferenceClickListener() {
					public boolean onPreferenceClick(Preference preference) {

						Intent i = new Intent(getApplicationContext(),
								ChangeBackgroundGridview.class);
						// Bundle b = new Bundle();
						// b.putInt("IMAGE", LiveWallpaperPreferences
						// .getInstance().getBackground());
						// i.putExtra("DATA", b);
						startActivity(i);

						// finish();
						return true;
					}
				});

		avatar = (Preference) findPreference("avatar");
		avatar.setOnPreferenceClickListener(new OnPreferenceClickListener() {
			public boolean onPreferenceClick(Preference preference) {

				Intent i = new Intent(getApplicationContext(), ChangeAvatarGridview.class);

				startActivity(i);

				return true;
			}
		});

		preview = (Preference) findPreference("preview_receive_msg");
		preview.setOnPreferenceClickListener(new OnPreferenceClickListener() {
			public boolean onPreferenceClick(Preference preference) {

				Intent i = new Intent(getApplicationContext(),
						LockScreenAppActivity.class);

				startActivity(i);

				return true;
			}
		});
	}

	@Override
	public boolean onPreferenceChange(Preference preference, Object newValue) {
		// TODO Auto-generated method stub

		return false;
	}

}
